//
//  UserCenterViewController.swift
//  MyOfO
//  用户中心
//  Created by Yuri on 2018/4/2.
//  Copyright © 2018年 Yuri. All rights reserved.
//

import UIKit

class UserCenterViewController: UIViewController, UITableViewDataSource, UINavigationControllerDelegate {

    
    
    let arrays  = ["我的行程", "我的钱包", "邀请好友", "我的客服"]
    let iconArrays = ["icon_slide_trip2", "icon_slide_wallet2", "icon_slide_invite2", "icon_slide_usage_guild2"]

    @IBAction func closeBtnClick(_ sender: Any) {
        dismiss(animated: true)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        navigationController?.delegate = self
        // Do any additional setup after loading the view.
    }
    
    func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
        navigationController.setNavigationBarHidden(true, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return arrays.count
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "UserCenterCell", for: indexPath) as! UserCenterCell
        cell.cellLabel.text = arrays[indexPath.row]
        cell.cellImageView.image = UIImage(named: iconArrays[indexPath.row])
        return cell
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
